/*#pragma once
#include<iostream>
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
#include <sys/types.h>
#include <sys/wait.h>

#define ERR_EXIT(m) do { perror(m); exit(EXIT_FAILURE); } while(0)

void Rwork(int _rfd)
{
    while(1)
    {
        char buf[1024];
        ssize_t rsz = read(_rfd,buf,1024);
        if(rsz < 0)
            ERR_EXIT("read");
        else if(rsz == 0)
        {
            printf("输入为0,exit\n");
            break;
        }
        else
        {
            printf("%s",buf);
        }
    }
}

void Wwork(int _wfd)//写
{
    int n = 3;
    std::string buf;
    while(n--)
    {
        getline(std::cin,buf);
        ssize_t sz = write(_wfd,buf.c_str(),sizeof(buf.c_str()));
        if(sz < 0)
            ERR_EXIT("write");
        else if(sz != sizeof(buf.c_str()))
            ERR_EXIT("write size false");
        else
        {}
    printf("剩余任务个数%d\n",n);
    }
}
    */